package thread;

public class RunnableDemo2 {
    public static void main(String[] args){
        Thread thread = new Thread(){
            @Override
            public void run(){
                for (int i = 0; i < 100; i++) {
                    System.out.println("1111");
                }
            }
        };
        Thread thread2 = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("2222");
            }
        });
        thread.start();
        thread2.start();
    }

}
